package com.victor9ac.mashup.api;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;


public class Comment implements Serializable{

	
	String author; 
	String text;
	String textRaw;
	List<String> urlFromComments;
	List<String> urlCommentImages;
	Date commentDate;
	CommentSource source;
	
	private static final long serialVersionUID = -1477559308191909447L;

	public Comment() {
		
	}

	public Comment(String author, String textRaw, Date date,CommentSource source) {
		super();
		this.author = author;
		this.textRaw = textRaw;
		this.commentDate = date;
		this.source = source;
	} 
	
	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public Date getCommentDate() {
		return commentDate;
	}

	public void setCommentDate(Date commentDate) {
		this.commentDate = commentDate;
	}

	public CommentSource getSource() {
		return source;
	}

	public void setSource(CommentSource source) {
		this.source = source;
	}

	public String toString (){
		return "-> autor:"+author+ " - fecha:"+commentDate+" - Fuente: "+source.name()+"\n"
				+ "comentario"+text;
	}

	public String getTextRaw() {
		return textRaw;
	}

	public void setTextRaw(String textRaw) {
		this.textRaw = textRaw;
	}

	public List<String> getUrlFromComments() {
		if (urlFromComments == null){
			urlFromComments = new ArrayList<String>();
		}
		return urlFromComments;
	}

	public void setUrlFromComments(List<String> urlFromComments) {
		this.urlFromComments = urlFromComments;
	}

	public List<String> getUrlCommentImages() {
		if(urlCommentImages == null){
			urlCommentImages = new ArrayList<String>();
		}
		return urlCommentImages;
	}

	public void setUrlCommentImages(List<String> urlCommentImages) {
		this.urlCommentImages = urlCommentImages;
	}

	
}
